<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <title th:replace="~{commons/admincommon::title}">index</title>
    <link rel="stylesheet" th:href="@{/layui/css/layui.css}">
</head>
<body class="layui-layout-body">
<div class="layui-layout layui-layout-admin">
    <div th:replace="~{commons/admincommon::header}"></div>
    <div th:replace="~{commons/admincommon::sidebar(active='sortmanager.html')}"></div>

    <div class="layui-body">
        <fieldset class="layui-elem-field layui-field-title">
            <legend>分类修改</legend>
        </fieldset>
        <form class="layui-form" th:action="@{/updateSort}" method="post">
            <input type="hidden" name="id" th:value="${sortInfo.getId()}">
            <div class="layui-form-item">
                <label class="layui-form-label">分类名称</label>
                <div class="layui-input-inline">
                    <input type="text" name="name" required placeholder="请输入分类名称"
                           class="layui-input" th:value="${sortInfo.getName()}">
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">是否有效</label>
                <div class="layui-input-block">
                    <input type="radio" name="isEffective" value="1" title="是"
                           th:checked="${sortInfo.getIsEffective()==1}"/>
                    <input type="radio" name="isEffective" value="0" title="否"
                           th:checked="${sortInfo.getIsEffective()==0}"/>
                </div>
            </div>
            <div class="layui-form-item">
                <div class="layui-input-block">
                    <button class="layui-btn" type="submit">立即提交</button>
                    <button type="reset" class="layui-btn layui-btn-primary">重置</button>
                </div>
            </div>
        </form>
    </div>
    <div th:replace="~{commons/admincommon::footer}"></div>
</div>
<script th:src="@{/layui/layui.js}"></script>
<script>
    layui.use(['element'], function () {
        var element = layui.element;
    });
    layui.use('form', function() {
        var form = layui.form;
    })
</script>
</table>
</body>
</html>